package cn.wolfcode.luowowo.hotel.domain;

import cn.wolfcode.luowowo.common.domain.BaseDomain;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class Area extends BaseDomain{
    private String name;  //区名称
    private Long destId;  //目的地id
    private String info;  //区简介
//    private int hotelnum;

    //价格统计
    private List<StarPrice> avgPrice;



    //获得第一句简介
    public String getInfo1(){
        String[] infos = info.split("。");
        return infos[0]+"。";
    }
    //获得第二句简介
    public String getInfo2(){
        String[] infos = info.split("。");
        return infos[1]+"。";
    }
    //获得第三句简介
    public String getInfo3(){
        String[] infos = info.split("。");
        if (infos.length <3) {
            return "";
        }
        return infos[2]+"。";
    }

}
